import items from '../../apis/items';

export default {
  namespaced: true,
  state: {
    items: [],
  },
  mutations: {
    setItems(state, data) {
      state.items = data;
    },
  },
  actions: {
    async getItems({ commit }, odata) {
      const { data } = await items.getItems(odata);
      commit('setItems', data);
    },
  },
};
